<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" href="css/reset.css">
</head>
	
	<style>
		#box{
			width: 50%;
			margin: 10px auto 0px;
			background: red;
		}
		li{
			width: 50px;
			height: 50px;
			background: red;
			border: 1px solid black;
			float: left
		}
	</style>

<body>
	<input type="button" value="自动生成100个Li" onclick="demo()">
	<div id="box">
		
	</div>
</body>
</html>


<script>
	function demo(){
		var box = document.getElementById('box');
		var str = '<ul>';
		for (var i = 0; i <100; i++) {
			if (4%i == 0) {}
			str += '<li></li>'
		}
		box.innerHTML = str + '</ul>';
	}
</script>
